Declaring a scope for your variable regulates its availability through different parts of your report. See Variable Scope (Crystal syntax)
The variable scopes available are:
To use variable scopes you add the scope that you want to declare with your variable at the beginning of your variable declaration statement. You can also omit the scope keyword and start the variable declaration with the type name. This is the same as declaring a Global variable.
Declares a global variable named Amount that can hold any value of an integer or decimal data type.
Declares a global variable named Amount that can hold any value of an integer or decimal data type. This variable would be available to formulas throughout the current report
Declares a global variable named Outstanding that can hold a TRUE or FALSE value.
Shared BooleanVar Outstanding;
Declares a shared variable named Outstanding that can hold a TRUE or FALSE value. This variable would be available in both the main report and any subreports contained within the main report.
StringVar LastName := "Adams";
Declares a global variable named LastName that can hold a string value and assigns the string "Adams" to that variable.
Local StringVar LastName : = "Adams";
Declares a local variable named LastName that can hold a string value and assigns the string "Adams" to that variable. This variable would be available only within the formula which it was declared.
Variable declarations (Crystal syntax).
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |